package com.sky.constant;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * 权限路由常量类
 */
public class RouterConstant {
    /**
     * 学校管理员路由
     */
    private static final List<String> ROUTER_SCHOOL = Collections.unmodifiableList(
            Arrays.asList("analysis", "application", "competition-approve","employee","team", "work-approve")
    );
    /**
     * 系管理员路由
     */
    private static final List<String> ROUTER_DEPARTMENT = Collections.unmodifiableList(
            Arrays.asList( "application", "competition-approve","employee","work")
    );
    /**
     * 指导教师路由
     */
    private static final List<String> ROUTER_INSTRUCTOR = Collections.unmodifiableList(
            Arrays.asList( "application",  "work")
    );

    /**
     * 根据权限获取路由
     * @param power  0:学校管理员 1:系管理员 2:指导教师
     * @return
     */
    public static  List<String> getRouterByPower(Integer power) {
        switch (power) {
            case 0:
                return ROUTER_SCHOOL;
            case 1:
                return ROUTER_DEPARTMENT;
            case 2:
                return ROUTER_INSTRUCTOR;
            default:
                throw new IllegalArgumentException("无效的权限等级: " + power);
        }
    }
}
